package com.java.tutorials.jdk7.fileattribute;

import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.attribute.BasicFileAttributes;
/**
 * Created by xuzhike on 2016/1/24.
 * http://www.java2s.com/Code/Java/JDK-7/ReadBasicFileAttributes.htm
 */
public class ReadBasicFileAttributesTest {
    public static void main(String[] args) throws Exception {

        Path file = Paths.get("/opt/platform/java");
        if (Files.isSymbolicLink(file)) {
            file = Files.readSymbolicLink(file);
        }
        Files.readAttributes(file, BasicFileAttributes.class);

    }
}
